#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n,m;
    cin >> n >> m;
    // 初始化n行m列的棋盘
    vector<vector<int>> cb (n+1, vector<int> (m+1));
    cb[0][0] = 1;
    for(int i = 0; i <= n; ++i){
        for(int j = 0; j <= m; ++j){
            if(i != 0){  // i == 0 || j == 0 在横轴或纵轴上只有一种走法
                cb[i][j] += cb[i-1][j];
            }
            if(j != 0){
                cb[i][j] += cb[i][j-1];
            }
        }
    }
    cout << cb[n][m];
    return 0;
}